﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using ComLib.Web.Modules.Links;
using ComLib.Web.Lib.Controllers;


namespace ComLib.CMS.Controllers
{
    /// <summary>
    /// Controller for Dynamic Html content pages.
    /// </summary>
    [HandleError]
    public class LinkController : EntityControllerAdmin<Link>
    {
        /*
        [AcceptVerbs(HttpVerbs.Post), Authorize(Roles="Admin")]
        public override ActionResult Create(Link entity)
        {
            return base.Create(entity);
        }


        [Authorize(Roles = "Admin")]
        public override ActionResult Delete(int id)
        {
            return base.Delete(id);
        }

        
        [Authorize(Roles = "Admin")]
        public override ActionResult Create()
        {
            return base.Create();
        }

        
        [Authorize(Roles = "Admin")]
        public override ActionResult Delete(int id, string confirmButton)
        {
            return base.Delete(id, confirmButton);
        }
        
        
        [Authorize(Roles = "Admin")]
        public override ActionResult Edit(int id)
        {
            return base.Edit(id);
        }

        
        [Authorize(Roles = "Admin")]
        public override ActionResult Edit(int id, FormCollection collection)
        {
            return base.Edit(id, collection);
        }


        [Authorize(Roles = "Admin")]
        public override ActionResult Index(int? page)
        {
            return base.Index(page);
        }


        [Authorize(Roles = "Admin")]
        public override ActionResult Manage(FormCollection formData)
        {
            return base.Manage(formData);
        }
        */

        /// <summary>
        /// OVerride the url to use after creation.
        /// </summary>
        protected override void Init()
        {
            Conf["CreateSuccessUrl"] = "manage";
            Conf["UpdateSuccessUrl"] = "manage";
        }
    }
}
